package com.xxx.mapper;

import com.xxx.pojo.Indent;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface IndentMapper {

    @Insert("insert into indent values (#{id},#{state},#{orderUser},#{payDateTime},#{payWay},#{money},#{tip},#{phone},#{address},#{userName})")
    int insertIndent(Indent indent);

    @Select("select * from indent;")
    @ResultMap("IndentResultMap")
    List<Indent> selectAll();

    @Delete("delete from indent where id = #{id};")
    int deleteById(Long id);
}
